package com.hqd.ch03.v26.spel.parse;

import com.hqd.ch03.v26.spel.EvaluationContext;
import com.hqd.ch03.v26.spel.Expression;

/**
 * 普通字符串
 */
public class LiteralExpression implements Expression {
    private final String literalValue;


    public LiteralExpression(String literalValue) {
        this.literalValue = literalValue;
    }

    @Override
    public String getExpressionString() {
        return literalValue;
    }

    @Override
    public Object getValue() {
        return literalValue;
    }

    @Override
    public Object getValue(EvaluationContext context) {
        return literalValue;
    }

    @Override
    public void setValue(EvaluationContext context, Object value) {

    }
}
